{% extends "base.html" %}
{# Copyright The IETF Trust 2015, All Rights Reserved #}
{% load origin %}
{% load static %}
{% load cache %}
{% block title %}Active Internet-Drafts{% endblock %}
{% block content %}
    {% cache 900 ietf_doc_index_active_drafts using="slowpages" %}
    {% origin %}
    <h1>Active Internet-Drafts</h1>
    <p>
        This page lists all active Internet-Drafts, grouped by responsible
        group. For normal use, it is recommended to use the
        <a href="{% url 'ietf.doc.views_search.search' %}">search page</a>.
    </p>
    <p>
        There is also an
        <a href="{% url 'ietf.doc.views_search.index_all_drafts' %}">
            index of all
            Internet-Drafts
        </a>
        (that page also lists some machine-readable files
        for download).
    </p>
    <p class="buttonlist">
        {% for group in groups %}
            <a class="btn btn-primary btn-sm" href="#id-{{ group.acronym }}">{{ group.acronym }}</a>
        {% endfor %}
    </p>
    {% for group in groups %}
        <h2 class="mt-3" id="id-{{ group.acronym }}">{{ group.name }} ({{ group.acronym }})</h2>
        {% for d in group.active_drafts %}
            <div class="card mb-3">
                <div class="card-body">
                    <b>{{ d.title }}.</b>
                    <br>
                    {% for a in d.authors %}
                        {{ a }}{% if not forloop.last %}, {% else %}.{% endif %}
                    {% endfor %}
                    <br>
                    <a href="{% url 'ietf.doc.views_doc.document_main' name=d.name rev=d.rev %}">{{ d.name }}-{{ d.rev }}</a>
                    <br>
                    {{ d.rev_time|date:"Y-m-d" }}
                </div>
            </div>
        {% endfor %}
    {% endfor %}
{% endcache %}
{% endblock %}